<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>AdminLTE | Mailbox</title>
    <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
    <!-- bootstrap 3.0.2 -->
    <link href="../static/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
    <!-- font Awesome -->
    <link href="../static/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
    <!-- Ionicons -->
    <link href="../static/css/ionicons.min.css" rel="stylesheet" type="text/css"/>
    <!-- bootstrap wysihtml5 - text editor -->
    <!--<link href="../static/css/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css" rel="stylesheet" type="text/css" />-->
    <!-- iCheck for checkboxes and radio inputs -->
    <link href="../static/css/iCheck/minimal/blue.css" rel="stylesheet" type="text/css"/>
    <!-- Theme style -->
    <link href="../static/css/AdminLTE.css" rel="stylesheet" type="text/css"/>
<body class="skin-blue" style="overflow: hidden">
<script>
    function refresh1() {
        window.location.assign("/findAllMailsInBox")
    }
    function refresh2() {
        window.location.assign("/findAllMailsSended")
    }
    function refresh3() {
        window.location.assign("/findAllMailsDeleted")
    }
</script>
<script>
    $(function () {
        var isSendMailOky = [[${issendoky}]]
        if (isSendMailOky) {
            $.message('发送成功');
        } else {
            $.message({
                message: '发送失败',
                type: 'error'
            });
        }
    })
</script>
<header class="header">
    <a href="index.html" class="logo">
        <!-- Add the class icon to your logo image or logo icon to add the margining -->
        AdminLTE
    </a>
    <!-- Header Navbar: style can be found in header.less -->
    <nav class="navbar navbar-static-top" role="navigation">
        <!-- Sidebar toggle button-->
        <a href="#" class="navbar-btn sidebar-toggle" data-toggle="offcanvas" role="button">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        </a>
        <div class="navbar-right">
            <ul class="nav navbar-nav">
                <!-- User Account: style can be found in dropdown.less -->
                <li class="dropdown user user-menu">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        <i class="glyphicon glyphicon-user"></i>
                        <span>ChouLan <i class="caret"></i></span>
                    </a>
                    <ul class="dropdown-menu">
                        <!-- User image -->
                        <li class="user-header bg-light-blue">
                            <img src="../static/img/pers/rw1.png" class="img-circle" alt="User Image"/>
                            <p>
                                Chou Lan
                            </p>
                        </li>
                        <!-- Menu Body -->
                        <li class="user-body">
                            <div class="col-xs-4 text-center">
                                <a href="/findManger">个人中心</a>
                            </div>
                            <div class="col-xs-4 text-center">
                                <a href="/findAllLogs">操作日志</a>
                            </div>
                            <div class="col-xs-4 text-center">
                                <a href="/login">退出登录</a>
                            </div>
                        </li>
                        <!--<li class="user-footer">
                            <div class="pull-right">
                                <a href="#" class="btn btn-default btn-flat">登出</a>
                            </div>
                        </li>-->
                    </ul>
                </li>
            </ul>
        </div>
    </nav>

</header>
<div class="wrapper row-offcanvas row-offcanvas-left">
    <!-- Left side column. contains the logo and sidebar -->
    <aside class="left-side sidebar-offcanvas">
        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar">
            <!-- Sidebar user panel -->
            <div class="user-panel">
                <div class="pull-left image">
                    <img src="../static/img/pers/rw1.png" class="img-circle" alt="User Image"/>
                </div>
                <div class="pull-left info">
                    <p>Hello, Choulan</p>

                    <a href="#"><i class="fa fa-circle text-success"></i> 在线</a>
                </div>
            </div>
            <!-- search form -->
            <form action="#" method="get" class="sidebar-form">
                <div class="input-group">
                    <input type="text" name="search" class="form-control" placeholder="搜索..."/>
                    <span class="input-group-btn">
                                <button type='submit' name='searchtoUrl' id='search-btn' class="btn btn-flat"><i
                                        class="fa fa-search"></i></button>
                            </span>
                </div>
            </form>
            <!-- /.search form -->
            <!-- sidebar menu: : style can be found in sidebar.less -->
            <ul class="sidebar-menu">
                <li class="active">
                    <a href="index.html">
                        <i class="fa fa-dashboard"></i> <span>首页</span>
                    </a>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-bar-chart-o"></i>
                        <span>日志管理</span>
                        <i class="fa fa-angle-left pull-right"></i>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="/LogCatchPre"><i class="fa fa-angle-double-right"></i> 日志获取</a></li>
                        <li><a href="LogAnalysis.html"><i class="fa fa-angle-double-right"></i> 日志分析</a></li>
                        <li><a href="LogWarn.html"><i class="fa fa-angle-double-right"></i> 日志报警</a></li>
                    </ul>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-table"></i> <span>系统管理</span>
                        <i class="fa fa-angle-left pull-right"></i>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="/SysRightPre"><i class="fa fa-angle-double-right"></i> 权限管理</a></li>
                        <li><a href="/PersRightPre"><i class="fa fa-angle-double-right"></i> 人员管理</a></li>
                    </ul>
                </li>
                <li>
                    <a href="calendar.html">
                        <i class="fa fa-calendar"></i> <span>日历</span>
                    </a>
                </li>
                <li class="active">
                    <a href="/findAllMailsInBox">
                        <i class="fa fa-envelope"></i> <span>邮箱</span>
                    </a>
                </li>
            </ul>
        </section>
        <!-- /.sidebar -->
    </aside>

    <!-- Right side column. Contains the navbar and content of the page -->
    <aside class="right-side">
        <!-- Content Header (Page header) -->
        <section class="content-header no-margin">
            <h1 class="text-center">
                Mailbox
            </h1>
        </section>

        <!-- Main content -->
        <section class="content">
            <!-- MAILBOX BEGIN -->
            <div class="mailbox row">
                <div class="col-xs-12">
                    <div class="box box-solid">
                        <div class="box-body">
                            <div class="row" style="display: none" id="mailbody1" th:if="${mailInBoxById}!=null">
                                <div class="form-group" style="text-align: left">
                                    <input class="btn btn-default" type="button" onclick="refresh1()"
                                           value="返回"/>
                                </div>
                                <div class="col-md-9 col-sm-8" >
                                    <div class="table-responsive">
                                        <!-- THE MESSAGES -->
                                        <table class="table table-mailbox" border="0">
                                            <tbody th:each="mailInBoxById:${mailInBoxById}">
                                            <tr>
                                                <th></th>
                                                <th></th>
                                            </tr>
                                            <tr>
                                                <td>主题；</td>
                                                <td th:text="${mailInBoxById.getSubject()}">SUBJECT</td>
                                            </tr>
                                            <tr>
                                                <td>收件人：</td>
                                                <td th:text="${mailInBoxById.getSendTo()}">SENDTO</td>
                                            </tr>
                                            <tr>
                                                <td>发件人：</td>
                                                <td th:text="${mailInBoxById.getSendFrom()}">SENDFROM</td>
                                            </tr>
                                            <tr>
                                                <td>发送时间:</td>
                                                <td th:text="${mailInBoxById.getDate()}">DATE</td>
                                            </tr>
                                            <tr>
                                                <td>正文：</td>
                                                <td th:text="${mailInBoxById.getContent()}">CONTENT</td>
                                            </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div><!-- /.row -->
                            <div class="row" style="display: none" id="mailbody2" th:if="${mailSendedById}!=null">
                                <div class="form-group" style="text-align: left">
                                    <input class="btn btn-default" type="button"onclick="refresh2()" value="返回"/>
                                </div>
                                <div class="col-md-9 col-sm-8" >
                                    <div class="table-responsive">
                                        <!-- THE MESSAGES -->
                                        <table class="table table-mailbox" border="0">
                                            <tbody th:each="mailSendedById:${mailSendedById}">
                                            <tr>
                                                <th></th>
                                                <th></th>
                                            </tr>
                                            <tr>
                                                <td>主题；</td>
                                                <td th:text="${mailSendedById.getSubject()}">SUBJECT</td>
                                            </tr>
                                            <tr>
                                                <td>收件人：</td>
                                                <td th:text="${mailSendedById.getSendTo()}">SENDTO</td>
                                            </tr>
                                            <tr>
                                                <td>发件人：</td>
                                                <td th:text="${mailSendedById.getSendFrom()}">SENDFROM</td>
                                            </tr>
                                            <tr>
                                                <td>发送时间:</td>
                                                <td th:text="${mailSendedById.getDate()}">DATE</td>
                                            </tr>
                                            <tr>
                                                <td>正文：</td>
                                                <td th:text="${mailSendedById.getContent()}">CONTENT</td>
                                            </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div><!-- /.row -->
                            <div class="row" style="display: none" id="mailbody3" th:if="${mailDeletedById}!=null">
                                <div class="form-group" style="text-align: left">
                                    <input class="btn btn-default" type="button"onclick="refresh3()" value="返回"/>
                                </div>
                                <div class="col-md-9 col-sm-8" >
                                    <div class="table-responsive">
                                        <!-- THE MESSAGES -->
                                        <table class="table table-mailbox" border="0">
                                            <tbody th:each="mailDeletedById:${mailDeletedById}">
                                            <tr>
                                                <th></th>
                                                <th></th>
                                            </tr>
                                            <tr>
                                                <td>主题；</td>
                                                <td th:text="${mailDeletedById.getSubject()}">SUBJECT</td>
                                            </tr>
                                            <tr>
                                                <td>收件人：</td>
                                                <td th:text="${mailDeletedById.getSendTo()}">SENDTO</td>
                                            </tr>
                                            <tr>
                                                <td>发件人：</td>
                                                <td th:text="${mailDeletedById.getSendFrom()}">SENDFROM</td>
                                            </tr>
                                            <tr>
                                                <td>发送时间:</td>
                                                <td th:text="${mailDeletedById.getDate()}">DATE</td>
                                            </tr>
                                            <tr>
                                                <td>正文：</td>
                                                <td th:text="${mailDeletedById.getContent()}">CONTENT</td>
                                            </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div><!-- /.row -->
                        </div><!-- /.box-body -->
                    </div><!-- /.box -->
                </div><!-- /.col (MAIN) -->
            </div>
            <!-- MAILBOX END -->
        </section><!-- /.content -->
    </aside><!-- /.right-side -->
</div><!-- ./wrapper -->

<!-- jQuery 2.0.2 -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<!-- Bootstrap -->
<script src="../static/js/bootstrap.min.js" type="text/javascript"></script>
<!-- AdminLTE App -->
<script src="../static/js/AdminLTE/app.js" type="text/javascript"></script>
<!-- Bootstrap WYSIHTML5 -->
<!--<script src="../static/js/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js" type="text/javascript"></script>-->
<!-- iCheck -->
<script src="../static/js/plugins/iCheck/icheck.min.js" type="text/javascript"></script>
<!-- Page script -->

<script th:inline="javascript">
    $(document).ready(function () {
        if ([[${session?.c1}]] !== null) {
            $("#mailbody1").css("display", "block");

        }
        if ([[${session?.c2}]] !== null) {
            $("#mailbody2").css("display", "block");

        }
        if ([[${session?.c3}]] !== null) {
            $("#mailbody3").css("display", "block");

        }
    });
</script>

</body>
</html>